import {Injectable} from '@angular/core';

@Injectable({
    providedIn: 'root'
})


export class PreviewsService {

    constructor() {
    }

    getSidebarData(): Array<any> {
        const metadata = [
            {
                name: '功能预览',
                icon: 'bars',
                children: [
                    {
                        name: '图标',
                        icon: '',
                        path: 'icon'
                    },
                    {
                        name: '地图',
                        icon: '',
                        path: 'map'
                    },
                    {
                        name: '动态表单',
                        icon: '',
                        path: 'dynamic-form'
                    },
                    {
                        name: '网页分享',
                        icon: 'anticon-share-alt',
                        path: 'web-pages-share'
                    },
                    {
                        name: '富文本编辑器',
                        icon: 'anticon-form',
                        path: 'kylin-editor'
                    },
                    {
                        name: '管道用法',
                        icon: 'anticon-ellipsis',
                        path: 'pipe-used'
                    },
                    {
                        name: '图库',
                        icon: 'anticon-picture',
                        path: 'light-gallery'
                    },
                    {
                        name: '上传',
                        icon: 'anticon-upload',
                        path: 'upload'
                    },
                    {
                        name: '缓存',
                        icon: 'anticon-hdd',
                        path: 'cache'
                    },
                    {
                        name: '摄像头监控',
                        icon: 'anticon-camera-o',
                        path: 'camera'
                    },
                    {
                        name: '统计图',
                        icon: 'anticon-area-chart',
                        path: 'echarts'
                    },
                    {
                        name: '无限滚动',
                        icon: 'anticon-sync',
                        path: 'infinite-scroll'
                    }
                ]
            },
            {
                name: '用法介绍',
                icon: 'icon-jieshao',
                children: [
                    {
                        name: '@component参数',
                        path: 'component'
                    },
                    {
                        name: 'CSS3动画',
                        path: 'css-animations'
                    },
                    {
                        name: '图片裁切',
                        path: 'cutting-pictures'
                    },
                    {
                        name: '居中',
                        path: 'css-middle'
                    },
                    {
                        name: '易出错',
                        path: 'error-prone'
                    },
                    {
                        name: '动态组件',
                        path: 'dynamic-components'
                    },
                    {
                        name: '小技巧',
                        path: 'tips'
                    },
                    {
                        name: 'rxjs',
                        path: 'rxjs'
                    }
                ]
            },
            {
                name: '开发测试',
                icon: 'icon-kaifa',
                children: [
                    {
                        name: 'kylin-ma',
                        path: '/previews/development-ma'
                    }
                ]
            }

        ];
        return metadata;
    }
}
